<oc-dialog  style="width:15rem;height:19rem"
	oc-dialog-icon="lemoncelogo" oc-dialog-title="注册窗口" oc-dialog-switch="MS">
	<form name="userForm" class="grid" ng-controller="Register">
		<label style="top:1rem;left:0.3rem;">用户名：</label>
		<div ng-messages="userForm.username.$error" style="top:1rem;right:0.3rem;">
			<div ng-message="required">用户名不为空</div>
			<div ng-message="minlength">不少于6个字符</div>
			<div ng-message="maxlength">不超过16个字符</div>
	 	</div>
		<label ng-show="checkusername" style="top:1rem;right:0.3rem;">用户名重复</label>
		<input type="text" name="username" style="top:2rem;left:0.3rem;width:14.4rem;"
			required ng-minlength="6" ng-maxlength="16"
			ng-blur="checkExisted('username')" ng-model="user.username"
			ng-change="change('username')" />
			
		<label style="top:3.5rem;left:0.3rem;">邮箱：</label>
		<div ng-messages="userForm.email.$error" style="top:3.5rem;right:0.3rem;">
			<div ng-message="required">邮箱不为空</div>
			<div ng-message="pattern">请输入正确格式的邮箱</div>
	 	</div>
		<label ng-show="checkemail" style="top:3.5rem;right:0.3rem;">邮箱重复</label>
		<input type="email" name="email" ng-model="user.email" 
			required ng-pattern="/^[a-zA-Z0-9._]+@[a-zA-Z0-9\-]+\.[a-z]{2,4}(\.[a-z]{2})?$/"
			style="top:4.5rem;left:0.3rem;width:14.4rem;"
			ng-blur="checkExisted('email')"
			ng-change="change('email')" />
			
		<label style="top:6rem;left:0.3rem;">密码：</label>
		<div ng-messages="userForm.password.$error" style="top:6rem;right:0.3rem;">
			<div ng-message="required">密码不为空</div>
			<div ng-message="minlength">不少于8个字符</div>
			<div ng-message="maxlength">不超过20个字符</div>
			<div ng-message="pattern">您输入了非法字符</div>
	 	</div>
		<input type="password" name="password" style="top:7rem;left:0.3rem;width:14.4rem;" 
			required ng-minlength="8" ng-maxlength="20" 
			ng-pattern="/^[a-zA-Z0-9!@#$%^&*()]*$/" ng-model="user.password">
		
		<label style="top:8.5rem;left:0.3rem;">再次确认密码：</label>
		<div ng-messages="userForm.confirm.$error" style="top:8.5rem;right:0.3rem;">
			<div ng-message="pattern">两次输入不一致</div>
		</div>
		<input type="password" name="confirm" ng-model="user.confirm" ng-pattern="user.password" 
			 required style="top:9.5rem;left:0.3rem;width:14.4rem;">
		
		<label style="top:11rem;left:0.3rem;">验证码：</label>
  		<label ng-show="captchaInfo" style="color:maroon;top:11rem;right:0.3rem;">验证码输入错误</label>
		<input type="text" name="captcha" style="top:12rem;left:0.3rem;width:6em"
			 ng-model="captcha" ng-model-options="{getterSetter:true}"/>
		<img ng-src="{{ocAPI.origin}}user/captcha?time={{ocAPI.timeStamp}}"
			 ng-click="ocAPI.getNow()"
			 style="top:11rem;right:0.3rem;cursor:pointer;width:9rem;height:3rem;"/>

        <a href="#" oc-dialog-open="{name:'other/terms',share:setTextType('terms')}"
			style="left:0.3rem;bottom:0.3rem">服务条款</a>
        <a href="#" oc-dialog-open="{name:'other/terms',share:setTextType('privacy')}"
			style="left:3.6rem;bottom:0.3rem">隐私条款</a>
        <a href="#" oc-dialog-open="{name:'other/terms',share:setTextType('disclaimer')}"
			style="left:7rem;bottom:0.3rem">免责声明</a>

		<button ng-click="register()"
			style="right:0.3rem;bottom:1.5rem;height:1.4rem;width:4.3rem;"
			ng-disabled="userForm.$invalid||checkusername||checkemail">注册</button>
	</form>
</oc-dialog>
